export default function (rawData, interval = 4, step = 4) {
  let output = new Array();
  for (let i = 0; i < rawData.length; i += interval) {
    let cell = JSON.parse(JSON.stringify(rawData[i]));
    for (let j = 1; j < step && j + i < rawData.length; j++) {
      for (let k = 0; k < cell.length; k++) {
        cell[k] += rawData[i + j][k];
      }
    }
    output.push(cell);
  }
  return output;
}
